
Alkaline.Processing.ValueUndefined = function() {
	return Alkaline.Processing.ValueUndefined.instance;
};

Alkaline.Processing.ValueUndefined.prototype = new Alkaline.Processing.ReferencedValue(
	Alkaline.Processing.ReferencedValue.VALUE_TYPE.UNDEFINED,
	null
);

Alkaline.Processing.ValueUndefined.instance = (function(){
	// basically, we do this so the following are true:
	//	ValueUndefined() instanceof ValueUndefined
	//	ValueUndefined() === ValueUndefined()
	var constructor = function(){};
	constructor.prototype = Alkaline.Processing.ValueUndefined.prototype;
	return new constructor();
})();

Alkaline.Processing.ValueUndefined.prototype._toPrimitive = function(unknown) {
	return;
}

Alkaline.Processing.ValueUndefined.prototype.toNumber = function(unknown) {
	return new Alkaline.Processing.ReferencedValue(Alkaline.Processing.ReferencedValue.VALUE_TYPE.NUMBER, NaN);
}

Alkaline.Processing.ValueUndefined.prototype.isSimpleValue = function() {
	return true;
}

Alkaline.Processing.ValueUndefined.prototype.toAST = function(builder) {
	throw new Error("ValueUndefined->toAST is not supported!");
}

Alkaline.Processing.ValueUndefined.prototype.toString = function() {
	return "Value:Undefined";
}
